<div class="grid_7">
                <div class="box">
                    <h2>
                        <a href="#" id="toggle-tables">STATE MANAGEMENT</a>
                    </h2>
                    <div class="block" >
                        <form name="admin-form" action="<?= base_url();?>admin/location/state_insert" method="post">
                            <fieldset>
                                <legend>STATES : NEW </legend>
                                <?php if($this->session->flashdata('message'))
                                          {
                                              $msg=$this->session->flashdata('message');
                                               echo '<font color="red">'.$msg.'</font>';
                                         }
                                        ?> 
                                <div class="field">
                                    <label> State Name</label>
                                    <input type="text" size="50" name="state" onfocus="if(this.value=='Enter State')this.value='';" 
                               onblur="if(this.value=='')this.value='Enter State';" value="Enter State" />
                                    <input type="hidden" name="country_id" value="<?= $country_id; ?>" />
                                    <input type="submit" value="Add State" name="insert" />
                                </div>
                                
                            </fieldset>
                        </form>
                    </div>
                </div> <!-- END OF BOX -->

                <div class="box">
                    <h2>
                        <a href="#" id="toggle-tables">STATE LIST : <?= $this->location_model->get_country_name($country_id); ?></a>
                    </h2>
                   
                    <div class="block" >
                        <fieldset>
                            <legend>List :</legend>
                            <?php foreach ($state as $state): ?>
                                <form name="update_make" action="<?= base_url();?>admin/location/state_update" method="post">
                                <div class="field">
                                <input type="hidden" size="10" name="state_id" value="<?= $state->id; ?>" />
                                <input type="hidden" size="10" name="country_id" value="<?= $state->country_id; ?>" />
                                <input type="text" size="50" name="state_detail" value="<?= $state->state; ?>" />
                                <input type="submit" value="Update" name="update_state" />
                                <div id="link-button" style="float: right">
                                    <a href="<?= base_url(); ?>admin/location/state_delete/<?= $state->country_id; ?>/<?= $state->id; ?>" class="link-button"> Delete </a>
                                    <a href="<?= base_url(); ?>admin/location/city/<?= $state->id; ?>/<?= $state->country_id; ?>" class="link-button"> View City </a>
                                </div>
                                </div>
                                 </form>
                              <?php endforeach; ?>
                                 
                        </fieldset>
                       
                    </div>
                         
                    <div class="pagination" align="left"> <?php  echo $this->pagination->create_links(); ?>  </div>
                </div> <!-- END OF BOX -->


            </div>
